home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 97 / CD-ROM 97 / CD-ROM 97.iso / jogos / spherical / Code / Library / vector.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-08-15  |  1.0 KB  |  33 lines

  1.  
  2. // Copyright (C) 2002 by Luigi Pino.  All Rights Reserved.
  3.  
  4. /***************************************************************************/
  5.  
  6. class vector3 {
  7.     public:
  8.         vector3();                                                                                // Constructor 1
  9.         vector3(float fx, float fy, float fz);                        // Constructor 2
  10.         ~vector3();                                                                                // Deconstructor
  11.  
  12.         void        Add(vector3 *vector_2);
  13.         void        Add(vector3 *vector_1, vector3 *vector_2);
  14.         void        Change_Direction(float direction);
  15.         void        Change_Length(float length);
  16.         void        Cross_Product(vector3 *vector_1, vector3 *vector_2);
  17.         float        Dot_Product(vector3 *vector_2);
  18.         float        Length();
  19.         float        Get_Direction();
  20.         void        Normal(float3 *point_1, float3 *point_2, float3 *point_3);
  21.         void        Normalize();
  22.         void        Normalize(vector3 *vector);
  23.         void        Scale(float amount);
  24.         void        Set_Velocity(float direction, float speed);
  25.         void        Sub(vector3 *vector_2);
  26.         void        Sub(vector3 *vector_1, vector3 *vector_2);
  27.  
  28.         float x;
  29.         float y;
  30.         float z;
  31. };
  32.  
  33. /***************************************************************************/